<script setup lang="jsx">
  import {watch,inject,ref,reactive,computed} from 'vue'
  import financialAccount from '@/api/finance/financialAccount'
  const crudRef = ref()
  const record = inject('record')
  let options = reactive({
      id: 'customer_bank',
      pk: 'id',
      showTools:false,
      autoRequest: record.value.id > 0,
      isDbClickEdit: true,
      expandSearch:false,
      api: financialAccount.getAllList,
      tablePagination:{style:{display:"none"}},
      rowSelection: {
        showCheckedAll: false
      },
      contextMenu: {
        // 是否开启右键菜单
        enabled: false,
      },
      beforeRequest:(param)=>{
        param.user_id = record.value.id
        param.type = 1
        return param
      },
    })

const columns = ref([
  {title: '账户名称', dataIndex: 'name'},
  {
    title: "币种",
    dataIndex: "currency",
    formType: "select",
    dict: {
      name: "currencyType",
      props: {
        label: "title",
        value: "key"
      },
      translation: true
    }
  },
  {title: '账户余额', dataIndex: 'balance'},
  {title: '未核销应付金额', dataIndex: 'customer_fee'},
  {title: '账户剩余', dataIndex: 'account_remaining'},
]);
</script>

<template>
  <a-grid-item :span="24"  class="hidden-list">
    <a-collapse :default-active-key="['1']" class="g-collapse-no-p">
      <a-collapse-item header="账户" key="1">
          <ma-crud :options="options" :columns="columns" ref="crudRef">

          </ma-crud>
      </a-collapse-item>
    </a-collapse>
  </a-grid-item>
</template>

<style>
.hidden-list ._crud-header,.hidden-list .mb-2,.hidden-list .operation-tools,.hidden-list .hidden-list.mb-1{
  display:none;
}

</style>